package gameLogic;

import gameElements.GBall;
import gameElements.GBox;
import gameElements.GBrick;

import java.awt.Color;

/**
 * Track002.java
 * 
 * Fredrik Wallenius and Peter Steiner 
 * DP08 - KTH - 2009
 *
 */
public class Track002 extends TrackEngine{
	
	

	public Track002(){
		super();
		this.trackName = "1337 bricks";
		this.trackId = 2;
	}
	
	/**
	 * RUn once before start. Will give the ElementHandler the bricks and balls
	 * and other init data
	 */
	public void initiateTrack(){

		
		GBall a = new GBall((double) 50, (double) 800, Color.blue, 15.0, elHandler.getElements());
		a.setVelocity(2.0, 8.0);
		a.setBoundingBox(WIDTH, HEIGHT);
		elHandler.addGfxElement(a);

		
		GBox b;
		// GBrick(double x, double y, Color color, double sizeX_, double sizeY_, Boolean causeBounce_, Boolean destroyable_, int hitBox_)
		int xCounter, yCounter;
		
		for(yCounter = 10; yCounter<600; yCounter+=26)
			for(xCounter = 25; xCounter<999; xCounter+=76){
				b = new GBrick((float) xCounter, (float) yCounter, Color.green, 75.0, 25.0, false, true, 1);
				b.setBoundingBox(WIDTH, HEIGHT);
				elHandler.addGfxElement(b);
			}
		
		
		super.initiateTrack();   // <-----  Do NOT remove!!!
	}
	
	public void start(){
		super.start();
	}
	
	

}